<%--
  Created by IntelliJ IDEA.
  User: wonders
  Date: 2020/12/16
  Time: 9:28
  To change this template use File | Settings | File Templates.
--%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p>
    <%
        int sum = (Integer) request.getSession().getAttribute("sum");
        out.println("execute process:" + sum + "<br/>");
        if (sum == 55) {
            out.println("complete!");
        } else {
            out.println("executing!");
        }
    %>
</p>
<script>
    var interval = window.setInterval(function () {
        <%
            if (sum == 55) {
        %>
                window.clearInterval(interval);
                return;
        <%
            }
        %>
        window.location.reload();
    }, 1000);
</script>
</body>
</html>
